var dialog = {};
dialog = {
    alert: function (content, title) {
        layer.alert(content, {
            title: "提示"
        });
    },
    msg: function (title, icon) {
        layer.msg(title, {
            icon: typeof icon != "undefined" ? icon : 2,
            time: 2000
        }, function () {
        });
    },
    iframeOpen: function (url, title, width, height, is_refresh) {
        layer.open({
            title: title,
            area: [width + 'px', height + 'px'],
            type: 2,
            content: [url, 'yes'],
            end: function () {
                if (typeof is_refresh != "undefined" && is_refresh == 1) {
                    window.location.reload(); // 关闭后强制刷新父页面
                }
            }
        });
    },
    tips: function (msg, id) {
        layer.tips(msg, "#" + id);
    }
};